import torch
import torch.nn.functional as F
import torch.nn as nn

class Bconv(nn.Module):
    def __init__(self, in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1):
        super(Bconv, self).__init__()
        self.conv = nn.Conv2d(in_channels, out_channels, kernel_size=kernel_size, stride=stride, padding=padding, dilation = dilation, bias=False)
        self.bn = nn.BatchNorm2d(out_channels)
        self.relu = nn.ReLU(inplace=True)

    def forward(self, x):
        out = self.conv(x)
        out = self.bn(out)
        out = self.relu(out)
        return out
    
if __name__ == '__main__':
    input = torch.randn(1, 3, 224, 224)
    model = Bconv(3, 64, 3, padding=1,stride=1)
    output = model(input)
    print(output.shape)